<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<html>
<head>
    <title>用户列表</title>
    <meta name="menu" content="useManage"/>

    <script type="text/javascript">
        $(document).ready(function(){
                $("#excelExport").click(function(){
                    var mainForm = $("#mainForm");
                    mainForm.attr("action","user!listExp.action");
                    mainForm.submit();
                    mainForm.attr("action","user.action");
                })
            })
    </script>

</head>

<body>
<div class="content_block">
    <%@ include file="/common/messages.jsp" %>
    <h2 class="jquery_tab_title">用户管理</h2>
    <form action="user.action" method="post" id="mainForm">
        <input type="hidden" id="fileDownloadToken" name="fileDownloadToken">
        <div>
        <p>
        <label for="filter_LIKES_searchName" class="inline">查找名字:</label>
        <input id="filter_LIKES_searchName" type="text" name="filter_LIKES_searchName"
               value="${param['filter_LIKES_searchName']}" size="11" class="input-small"/>
        <label for="filter_LIKES_firstName" class="inline">姓名:</label>
        <input id="filter_LIKES_firstName" type="text" name="filter_LIKES_firstName"
               value="${param['filter_LIKES_firstName']}" size="11" class="input-small"/>
        <label for="filter_LIKES_userId"  class="inline">登录名:</label>
        <input id="filter_LIKES_userId" type="text" name="filter_LIKES_userId"
               value="${param['filter_LIKES_userId']}" size="11" class="input-small"/>
        <a class="button" onclick="searchPage();"><span>搜索</span></a>
        </p>
            <table width="100%" cellpadding="0" id="table_liquid" cellspacing="0">
                <thead>
                <tr>
                    <th><a href="javascript:sort('firstName','asc')" scope="col">姓名</a></th>
                    <th><a href="javascript:sort('searchName','asc')" scope="col">查找名字</a></th>
                    <th><a href="javascript:sort('userId','asc')" scope="col">登录名</a></th>
                    <th><a href="javascript:sort('jobTitle','asc')" scope="col">职位</a></th>
                    <th><a href="javascript:sort('telephone','asc')" scope="col">电话号码</a></th>
                    <th><a href="javascript:sort('ext','asc')" scope="col">短 号</a></th>
                    <th><a href="javascript:sort('cellPhone','asc')" scope="col">手机</a></th>
                    <th><a href="javascript:sort('deptId','asc')" scope="col">所属部门</a></th>
                    <th>管理部门</th>
                    <th>角色</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <s:iterator value="page.result">
                    <tr>
                        <td>${firstName}&nbsp;</td>
                        <td>${searchName}&nbsp;</td>
                        <td>${userId}&nbsp;</td>
                        <td>${jobTitle}&nbsp;</td>
                        <td>${telephone}&nbsp;</td>
                        <td>${ext}&nbsp;</td>
                        <td>${cellPhone}&nbsp;</td>
                        <td><code:dispCodeDesc table="ACT_ID_GROUP" codeColumn="NAME_"  valueColumn="ID" codeValue="${deptId}" />&nbsp;</td>
                        <td><stringDisplay:short length="10" fullText="${deptNames}" />&nbsp;</td>
                        <td>${roleNames}&nbsp;</td>
                        <td><code:dispCodeDesc codeType="USER_ENABLED"  codeValue="${enabled}"/> &nbsp;</td>
                        <td width="90">
                            <a href="user!input.action?id=${id}" title="修改">修改</a>
                            <a href="user!delete.action?id=${id}" title="删除" class="delete_link">删除</a>
                        </td>
                    </tr>
                </s:iterator>
                <tr>
                    <td colspan="4" class="tdButton">
                        <c:if test="${page.totalCount>0}">
                        <a href="#"  id="excelExport" class="button">导出Excel</a>
                         </c:if>
                        <a href="user!input.action" class="button">增加新用户</a>
                    </td>
                    <td colspan="8" class="pagination">
                        <%@ include file="/common/pagination.jsp" %>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </form>
</div>
<!--end content_block-->

</body>
</html>
